/**
 * 
 */
package com.blogspot.radanddev.mbanksmsreader;

import com.blogspot.radanddev.mbanksmsreader.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;

/**
 * @author: Radoslaw Czwojdrak (Rad and Dev)
 */

public class Okienko extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		
		String Tresc_powiadomienia  = "";
		String Operacja = "";
		
		Bundle extras = getIntent().getExtras();
		if (extras != null)
		{
			Tresc_powiadomienia = extras.getString("haslo");
			Operacja = extras.getString("operacja");
		}
		
        TextView Info1 = (TextView)findViewById(R.id.info);        
        Info1.setText(Tresc_powiadomienia);

        TextView Info2 = (TextView)findViewById(R.id.operacja);        
        Info2.setText(Operacja);
        
        Button button1 = (Button)findViewById(R.id.Button1);        
        button1.setOnClickListener(mButton1);

        ImageButton button2 = (ImageButton)findViewById(R.id.Button2);        
        button2.setOnClickListener(mButton2);
		
	
	}
	    
    private OnClickListener mButton1 = new OnClickListener()
    {
		@Override
		public void onClick(View arg0) {
			finish();	        
		}
    };
    
    
    private OnClickListener mButton2 = new OnClickListener()
    {
		@Override
		public void onClick(View arg0) {
		
			
            AlertDialog.Builder alertbox = new AlertDialog.Builder(arg0.getContext());  
              
            alertbox.setNeutralButton(R.string.ok, new DialogInterface.OnClickListener() {  
                public void onClick(DialogInterface arg0, int arg1) {  
                }  
            });
            alertbox.setIcon(R.drawable.icon);
            alertbox.setTitle(R.string.about);
            alertbox.setMessage(R.string.info);
            alertbox.show();
		}
    };

}
